public class TestAnimal {
    public void eat(Animal a){
        a.eat();
    }

    public static void main(String[] args) {
        Animal cat = new Cat("云宝",3);

        Animal dog = new Dog("大黄",4);

        cat.eat();
        dog.eat();
    }
}
